import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:hook_up_rent/store/store.dart';
import 'package:hook_up_rent/widgets/common_toast.dart';

class SettingsPage extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    LoginStateController loginStateController = Get.put(LoginStateController());
    return Scaffold(
      appBar: AppBar(
        title: Text("设置"),
        centerTitle: true,
      ),
      body: Row(
        mainAxisAlignment: MainAxisAlignment.center,
        children: [
          Container(
            width: MediaQuery.of(context).size.width * 0.8,
            child: ElevatedButton(
              onPressed: () {
                showToast(context, "退出登录成功");
                loginStateController.changeLoginState(false);
              },
              child: Text("退出"),
            ),
          ),
        ],
      ),
    );
  }
}
